/*
* Copyright 2009 NOR_/D Labs <http://labs.nortd.com>
*
* This file is part of SceneExpression.
* SceneExpression is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License 
* as published by the Free Software Foundation, either version 3 of 
* the License, or (at your option) any later version. For details
* see <http://www.gnu.org/licenses/>.
*
* * *
* 
*/

#ifndef SX_BUTTON
#define SX_BUTTON


#include <sx/Widget.h>

namespace sx {


class ButtonWidget:  public Widget {
    public:
  
        ButtonWidget();
                
        void setLabelColor( float r, float g, float b, float a );        
        void addEventHandler( ButtonHandler* handler );                
        
        virtual void reshape();        
        
        bool touchDown( Touch& touch );
        bool touchMove( Touch& touch );
        bool touchUp( Touch& touch );
            
            
    protected:
        std::string _defaultTypeface;  
        osg::ref_ptr<osgText::Text>   _label;    
        std::vector<ButtonHandler*> _handlers;
        osg::Vec4 _buttonPressBorderColor;
        osg::Vec4 _buttonPressBorderColorTemp;
    
};


}
#endif